.class public Lcom/glympse/platform/ProviderVerizon;
.super Ljava/lang/Object;
.source "ProviderVerizon.java"

# interfaces
.implements Lcom/nbi/location/LocationListener;


# static fields
.field public static final NBI_TOKEN:Ljava/lang/String; = "V/0DNOTMdxcr3wHbFOHSmLDh7leV2BwVmULcE43Y"

.field public static VERIZON_SUPPORTED:Z

.field public static ms_nVerizon:I

.field private static ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

.field private static ms_oNBIContext:Lcom/nbi/common/NBIContext;


# instance fields
.field private m_fRunning:Z


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 87
    const/4 v0, 0x1

    sput-boolean v0, Lcom/glympse/platform/ProviderVerizon;->VERIZON_SUPPORTED:Z

    .line 91
    sput-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    .line 92
    sput-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    .line 109
    const/4 v0, 0x0

    sput v0, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    .line 85
    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 85
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 94
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    .line 85
    return-void
.end method

.method public static AllowVerizon()Z
    .locals 1

    .prologue
    .line 153
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-boolean v0, v0, Lcom/glympse/platform/Config;->m_fDebug:Z

    if-nez v0, :cond_1

    :cond_0
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsVerizon()Z

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected static Destroy()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 99
    sput-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    .line 101
    sget-object v0, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    if-eqz v0, :cond_0

    .line 103
    sget-object v0, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    invoke-virtual {v0}, Lcom/nbi/common/NBIContext;->destroy()V

    .line 104
    sput-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    .line 106
    :cond_0
    return-void
.end method

.method public static DoRoute(DDLjava/lang/String;)Z
    .locals 9
    .parameter "dDstLat"
    .parameter "dDstLng"
    .parameter "strName"

    .prologue
    .line 199
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v2, "Attempting VZ Navigator route to \""

    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, "\" ("

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p0, p1}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ", "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, ")"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 204
    :try_start_0
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->AllowVerizon()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 207
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsNavigationAvailable()Z

    move-result v7

    .line 208
    .local v7, fIsNavigationAvailable:Z
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v2, "IsNavigationAvailable: "

    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 211
    if-eqz v7, :cond_2

    .line 214
    new-instance v8, Lcom/nbi/location/Location;

    invoke-direct {v8}, Lcom/nbi/location/Location;-><init>()V

    .line 215
    .local v8, oLocation:Lcom/nbi/location/Location;
    invoke-virtual {v8, p0, p1}, Lcom/nbi/location/Location;->setLatitude(D)V

    .line 216
    invoke-virtual {v8, p2, p3}, Lcom/nbi/location/Location;->setLongitude(D)V

    .line 217
    const/4 v0, 0x3

    invoke-virtual {v8, v0}, Lcom/nbi/location/Location;->setValid(I)V

    .line 219
    new-instance v1, Lcom/nbi/map/data/Place;

    invoke-direct {v1, v8}, Lcom/nbi/map/data/Place;-><init>(Lcom/nbi/location/Location;)V

    .line 220
    .local v1, oPlace:Lcom/nbi/map/data/Place;
    invoke-static {p4}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    const-string v0, "Destination"

    :goto_0
    invoke-virtual {v1, v0}, Lcom/nbi/map/data/Place;->setName(Ljava/lang/String;)V

    .line 224
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetNBIContext()Lcom/nbi/common/NBIContext;

    move-result-object v0

    .line 226
    const-string v2, "fastest"

    .line 227
    const-string v3, ""

    .line 228
    const-string v4, "car"

    .line 229
    const/4 v5, 0x1

    .line 223
    invoke-static/range {v0 .. v5}, Lcom/nbi/map/android/MapUtils;->navigateTo(Lcom/nbi/common/NBIContext;Lcom/nbi/map/data/Place;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 257
    .end local v1           #oPlace:Lcom/nbi/map/data/Place;
    .end local v7           #fIsNavigationAvailable:Z
    .end local v8           #oLocation:Lcom/nbi/location/Location;
    :cond_0
    :goto_1
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsVerizon()Z

    move-result v0

    :goto_2
    return v0

    .restart local v1       #oPlace:Lcom/nbi/map/data/Place;
    .restart local v7       #fIsNavigationAvailable:Z
    .restart local v8       #oLocation:Lcom/nbi/location/Location;
    :cond_1
    move-object v0, p4

    .line 220
    goto :goto_0

    .line 233
    .end local v1           #oPlace:Lcom/nbi/map/data/Place;
    .end local v8           #oLocation:Lcom/nbi/location/Location;
    :cond_2
    :try_start_1
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsVerizon()Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    if-eqz v0, :cond_0

    .line 246
    const/4 v0, 0x0

    goto :goto_2

    .line 251
    .end local v7           #fIsNavigationAvailable:Z
    :catch_0
    move-exception v0

    move-object v6, v0

    .line 253
    .local v6, e:Ljava/lang/Exception;
    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_1
.end method

.method protected static GetNBIContext()Lcom/nbi/common/NBIContext;
    .locals 5

    .prologue
    .line 159
    sget-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    if-nez v1, :cond_0

    .line 164
    :try_start_0
    new-instance v1, Lcom/nbi/common/NBIContext;

    sget-object v2, Lcom/glympse/platform/Platform;->m_oContext:Landroid/content/Context;

    const-string v3, "V/0DNOTMdxcr3wHbFOHSmLDh7leV2BwVmULcE43Y"

    const/4 v4, 0x0

    invoke-direct {v1, v2, v3, v4}, Lcom/nbi/common/NBIContext;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    sput-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 171
    :cond_0
    :goto_0
    sget-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oNBIContext:Lcom/nbi/common/NBIContext;

    return-object v1

    .line 166
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 168
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method public static GetRouteToDestImage()I
    .locals 1

    .prologue
    .line 291
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->ShowVZNavigatorIcon()Z

    move-result v0

    if-eqz v0, :cond_0

    const v0, 0x7f020004

    :goto_0
    return v0

    :cond_0
    const v0, 0x7f020002

    goto :goto_0
.end method

.method public static GetRouteToUserImage()I
    .locals 1

    .prologue
    .line 285
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->ShowVZNavigatorIcon()Z

    move-result v0

    if-eqz v0, :cond_0

    const v0, 0x7f020004

    :goto_0
    return v0

    :cond_0
    const v0, 0x7f020003

    goto :goto_0
.end method

.method protected static IsNavigationAvailable()Z
    .locals 4

    .prologue
    .line 178
    sget-object v2, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->ParseInt(Ljava/lang/String;)I

    move-result v2

    const/4 v3, 0x5

    if-lt v2, v3, :cond_0

    .line 182
    :try_start_0
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetNBIContext()Lcom/nbi/common/NBIContext;

    move-result-object v1

    .line 183
    .local v1, oNBIContext:Lcom/nbi/common/NBIContext;
    if-eqz v1, :cond_0

    .line 185
    invoke-static {v1}, Lcom/nbi/map/android/MapUtils;->isNavigationAvailable(Lcom/nbi/common/NBIContext;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v2

    .line 193
    .end local v1           #oNBIContext:Lcom/nbi/common/NBIContext;
    :goto_0
    return v2

    .line 188
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 190
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    .line 193
    .end local v0           #e:Ljava/lang/Exception;
    :cond_0
    const/4 v2, 0x0

    goto :goto_0
.end method

.method public static IsVerizon()Z
    .locals 6

    .prologue
    const/4 v5, 0x1

    .line 113
    sget v3, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    if-nez v3, :cond_1

    .line 116
    const/4 v3, -0x1

    sput v3, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    .line 119
    sget-object v3, Landroid/os/Build;->BRAND:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    const-string v4, "verizon"

    invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 121
    sput v5, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    .line 144
    :cond_0
    :goto_0
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "IsVerizon: "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget v4, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 147
    :cond_1
    sget v3, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I

    if-lez v3, :cond_5

    move v3, v5

    :goto_1
    return v3

    .line 129
    :cond_2
    :try_start_0
    sget-object v3, Lcom/glympse/platform/Platform;->m_oContext:Landroid/content/Context;

    const-string v4, "phone"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 130
    .local v0, oTelephonyManager:Landroid/telephony/TelephonyManager;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperatorName()Ljava/lang/String;

    move-result-object v2

    .line 131
    .local v2, strSim:Ljava/lang/String;
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String;

    move-result-object v1

    .line 133
    .local v1, strNet:Ljava/lang/String;
    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_3

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    const-string v4, "verizon"

    invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_4

    .line 134
    :cond_3
    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_0

    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    const-string v4, "verizon"

    invoke-virtual {v3, v4}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 136
    :cond_4
    const/4 v3, 0x1

    sput v3, Lcom/glympse/platform/ProviderVerizon;->ms_nVerizon:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 139
    .end local v0           #oTelephonyManager:Landroid/telephony/TelephonyManager;
    .end local v1           #strNet:Ljava/lang/String;
    .end local v2           #strSim:Ljava/lang/String;
    :catch_0
    move-exception v3

    goto :goto_0

    .line 147
    :cond_5
    const/4 v3, 0x0

    goto :goto_1
.end method

.method public static ShowVZNavigatorIcon()Z
    .locals 1

    .prologue
    .line 264
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->AllowVerizon()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 267
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsNavigationAvailable()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 269
    const/4 v0, 0x1

    .line 279
    :goto_0
    return v0

    .line 273
    :cond_0
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->IsVerizon()Z

    .line 279
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method protected CreateLocPoint(Lcom/nbi/location/Location;)Lcom/glympse/platform/common/LocPoint;
    .locals 10
    .parameter "oLocation"

    .prologue
    const-wide/high16 v7, 0x7ff8

    const/high16 v6, 0x7fc0

    .line 358
    const-wide v0, 0x4990f83c00L

    .line 360
    .local v0, lVerizonOffsetMS:J
    new-instance v3, Lcom/glympse/platform/common/LocPoint;

    const/4 v4, 0x1

    invoke-direct {v3, v4}, Lcom/glympse/platform/common/LocPoint;-><init>(Z)V

    .line 361
    .local v3, oLocPoint:Lcom/glympse/platform/common/LocPoint;
    invoke-virtual {p1}, Lcom/nbi/location/Location;->getValid()I

    move-result v2

    .line 362
    .local v2, nValid:I
    const/4 v4, 0x4

    iput v4, v3, Lcom/glympse/platform/common/LocPoint;->m_eLocProvider:I

    .line 363
    and-int/lit8 v4, v2, 0x1

    if-eqz v4, :cond_0

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getLatitude()D

    move-result-wide v4

    :goto_0
    iput-wide v4, v3, Lcom/glympse/platform/common/LocPoint;->m_dLatitude:D

    .line 364
    and-int/lit8 v4, v2, 0x2

    if-eqz v4, :cond_1

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getLongitude()D

    move-result-wide v4

    :goto_1
    iput-wide v4, v3, Lcom/glympse/platform/common/LocPoint;->m_dLongitude:D

    .line 365
    and-int/lit8 v4, v2, 0x4

    if-eqz v4, :cond_2

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getAltitude()D

    move-result-wide v4

    double-to-float v4, v4

    :goto_2
    iput v4, v3, Lcom/glympse/platform/common/LocPoint;->m_fltAltitudeMeters:F

    .line 366
    and-int/lit8 v4, v2, 0x8

    if-eqz v4, :cond_3

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getHeading()D

    move-result-wide v4

    double-to-float v4, v4

    :goto_3
    iput v4, v3, Lcom/glympse/platform/common/LocPoint;->m_fltBearingDegrees:F

    .line 367
    and-int/lit8 v4, v2, 0x10

    if-eqz v4, :cond_4

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getHorizontalVelocity()D

    move-result-wide v4

    double-to-float v4, v4

    :goto_4
    iput v4, v3, Lcom/glympse/platform/common/LocPoint;->m_fltSpeedMetersPerSecond:F

    .line 368
    and-int/lit16 v4, v2, 0x80

    if-eqz v4, :cond_5

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getAccuracy()I

    move-result v4

    int-to-float v4, v4

    :goto_5
    iput v4, v3, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    .line 369
    const-wide v4, 0x4990f83c00L

    invoke-virtual {p1}, Lcom/nbi/location/Location;->getGpsTime()J

    move-result-wide v6

    const-wide/16 v8, 0x3e8

    mul-long/2addr v6, v8

    add-long/2addr v4, v6

    iput-wide v4, v3, Lcom/glympse/platform/common/LocPoint;->m_lLocationTime:J

    .line 371
    return-object v3

    :cond_0
    move-wide v4, v7

    .line 363
    goto :goto_0

    :cond_1
    move-wide v4, v7

    .line 364
    goto :goto_1

    :cond_2
    move v4, v6

    .line 365
    goto :goto_2

    :cond_3
    move v4, v6

    .line 366
    goto :goto_3

    :cond_4
    move v4, v6

    .line 367
    goto :goto_4

    :cond_5
    move v4, v6

    .line 368
    goto :goto_5
.end method

.method protected Start()Z
    .locals 4

    .prologue
    .line 299
    :try_start_0
    sget-object v2, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    if-nez v2, :cond_0

    .line 310
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetNBIContext()Lcom/nbi/common/NBIContext;

    move-result-object v1

    .line 311
    .local v1, oNBIContext:Lcom/nbi/common/NBIContext;
    if-eqz v1, :cond_0

    .line 313
    invoke-static {}, Lcom/glympse/platform/ProviderVerizon;->GetNBIContext()Lcom/nbi/common/NBIContext;

    move-result-object v2

    const/4 v3, 0x0

    invoke-static {v2, v3}, Lcom/nbi/location/LocationProvider;->getInstance(Lcom/nbi/common/NBIContext;Lcom/nbi/location/LocationConfig;)Lcom/nbi/location/LocationProvider;

    move-result-object v2

    sput-object v2, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    .line 317
    .end local v1           #oNBIContext:Lcom/nbi/common/NBIContext;
    :cond_0
    iget-boolean v2, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    if-nez v2, :cond_1

    sget-object v2, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    if-eqz v2, :cond_1

    .line 319
    const-string v2, "Starting Verizon Provider"

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 322
    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    .line 325
    sget-object v2, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    invoke-virtual {v2, p0}, Lcom/nbi/location/LocationProvider;->startReceivingFixes(Lcom/nbi/location/LocationListener;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 334
    :cond_1
    :goto_0
    iget-boolean v2, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    return v2

    .line 328
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 330
    .local v0, e:Ljava/lang/Exception;
    const/4 v2, 0x0

    iput-boolean v2, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    .line 331
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method protected Stop()V
    .locals 2

    .prologue
    .line 340
    iget-boolean v1, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    if-eqz v1, :cond_0

    sget-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    if-eqz v1, :cond_0

    .line 342
    const-string v1, "Stopping Verizon Provider"

    invoke-static {v1}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 345
    :try_start_0
    sget-object v1, Lcom/glympse/platform/ProviderVerizon;->ms_oLocationProvider:Lcom/nbi/location/LocationProvider;

    invoke-virtual {v1, p0}, Lcom/nbi/location/LocationProvider;->stopReceivingFixes(Lcom/nbi/location/LocationListener;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 351
    :goto_0
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/glympse/platform/ProviderVerizon;->m_fRunning:Z

    .line 353
    :cond_0
    return-void

    .line 347
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 349
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method public locationUpdated(Lcom/nbi/location/Location;)V
    .locals 3
    .parameter "oLocation"

    .prologue
    .line 377
    if-eqz p1, :cond_0

    .line 381
    :try_start_0
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oLocManager:Lcom/glympse/platform/LocManager;

    invoke-virtual {p0, p1}, Lcom/glympse/platform/ProviderVerizon;->CreateLocPoint(Lcom/nbi/location/Location;)Lcom/glympse/platform/common/LocPoint;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/glympse/platform/LocManager;->AddLocation(Lcom/glympse/platform/common/LocPoint;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 388
    :cond_0
    :goto_0
    return-void

    .line 383
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 385
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method public onLocationError(I)V
    .locals 2
    .parameter "nErrorCode"

    .prologue
    .line 393
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "ProviderVerizon::onLocationError("

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 394
    return-void
.end method

.method public providerStateChanged(I)V
    .locals 2
    .parameter "nNewState"

    .prologue
    .line 399
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "ProviderVerizon::providerStateChanged("

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 400
    return-void
.end method
